/**
 * 
 */
package com.sci.web.action.datareportseason.enterprisenew;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import com.sci.web.action.util.BaseAction;
import com.sci.web.dao.DataReportM_InnovateBaseDao;

/**
 * @author BaiFuyou
 * @date: Nov 10, 2011 2:18:23 PM
 */
public class DeleteOneEnterprise_NewData extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5995691729367477510L;
	@Resource
	private DataReportM_InnovateBaseDao dataReportM_InnovateBaseDao;
	private int pid;
	private int eid;

	/**
	 * @return the pid
	 */
	public int getPid() {
		return pid;
	}

	/**
	 * @param pid
	 *            the pid to set
	 */
	public void setPid(int pid) {
		this.pid = pid;
	}

	/**
	 * @return the eid
	 */
	public int getEid() {
		return eid;
	}

	/**
	 * @param eid
	 *            the eid to set
	 */
	public void setEid(int eid) {
		this.eid = eid;
	}

	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		super.setContentType(super.JSON);
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("new_id", pid);
		map.put("enterprise_id", eid);
		if (dataReportM_InnovateBaseDao.deleteEnterprise_NewData(map)) {
			super.outPrint("ok");
		} else {
			super.outPrint("fail");
		}
		return "json";
	}
}
